/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package crm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author abet
 */
@Entity
@Table(name="authorities")
public class Role {
    @Id 
    private String id;
    @Column(name="username", length=255, nullable=false,unique=true)
    private String username;
    @Column(name="authority", length=255, nullable=false,unique=true)
    private String authorities;
    @ManyToOne
    @JoinColumn(name="user_id")
    private User user;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getauthorities() {
        return authorities;
    }

    public void setauthorities(String authorities) {
        this.authorities = authorities;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
